summaryrefslogtreecommitdiff
path: root/app/[lng]/evcp/(evcp)/information/page.tsx
diff options
context:
space:
mode:
Diffstat (limited to 'app/[lng]/evcp/(evcp)/information/page.tsx')
-rw-r--r--app/[lng]/evcp/(evcp)/information/page.tsx35
1 files changed, 24 insertions, 11 deletions
diff --git a/app/[lng]/evcp/(evcp)/information/page.tsx b/app/[lng]/evcp/(evcp)/information/page.tsx
index 4027ab8a..db383c32 100644
--- a/app/[lng]/evcp/(evcp)/information/page.tsx
+++ b/app/[lng]/evcp/(evcp)/information/page.tsx
@@ -4,9 +4,7 @@ import { unstable_noStore as noStore } from "next/cache"
import { Shell } from "@/components/shell"
import { getInformationLists } from "@/lib/information/service"
-import { InformationTable } from "@/lib/information/table/information-table"
-import { searchParamsInformationCache } from "@/lib/information/validations"
-import type { SearchParams } from "@/types/table"
+import { InformationClient } from "@/components/information/information-client"
import { InformationButton } from "@/components/information/information-button"
export const metadata: Metadata = {
@@ -15,15 +13,30 @@ export const metadata: Metadata = {
}
interface InformationPageProps {
- searchParams: Promise<SearchParams>
+ params: Promise<{ lng: string }>
}
-export default async function InformationPage({ searchParams }: InformationPageProps) {
+export default async function InformationPage({ params }: InformationPageProps) {
noStore()
+
+ const { lng } = await params
- const search = await searchParamsInformationCache.parse(await searchParams)
-
- const informationPromise = getInformationLists(search)
+ // 초기 데이터 로딩
+ const initialData = await getInformationLists({
+ page: 1,
+ perPage: 500,
+ search: "",
+ sort: [{ id: "createdAt", desc: true }],
+ flags: [],
+ filters: [],
+ joinOperator: "and",
+ pagePath: "",
+ pageName: "",
+ informationContent: "",
+ isActive: null,
+ from: "",
+ to: "",
+ })
return (
<Shell className="gap-2">
@@ -32,14 +45,14 @@ export default async function InformationPage({ searchParams }: InformationPageP
<div>
<div className="flex items-center gap-2">
<h2 className="text-2xl font-bold tracking-tight">
- 도움말 관리
+ 인포메이션 관리
</h2>
- <InformationButton pageCode="evcp/information" />
+ <InformationButton pagePath="/evcp/information" />
</div>
</div>
</div>
</div>
- <InformationTable promises={informationPromise} />
+ <InformationClient lng={lng} initialData={initialData?.data || []} />
</Shell>
)
} \ No newline at end of file